package io.kubesphere.devops.core;

import java.util.UUID;

public class UuidUtils {

    private UuidUtils() {
        // hide for utils
    }

    /**
     * 获取32位字符串uuid
     *
     * @return
     */
    public static String getRandomUUIDString() {
        String s = UUID.randomUUID().toString();
        // 去掉“-”符号
        StringBuilder build = new StringBuilder();
        build.append(s.substring(0, 8)).append(s.substring(9, 13)).append(s.substring(14, 18))
                .append(s.substring(19, 23)).append(s.substring(24));

        return new String(build);
    }

}
